package com.mnb.base.mapper;

import com.mnb.base.entity.StPptnR;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface StPptnRMapper {
    int deleteByPrimaryKey(@Param("stcd") String stcd, @Param("tm") Date tm);

    int insert(StPptnR record);

    int insertSelective(StPptnR record);

    StPptnR selectByPrimaryKey(@Param("stcd") String stcd, @Param("tm") Date tm);

    int updateByPrimaryKeySelective(StPptnR record);

    int updateByPrimaryKey(StPptnR record);

    List<StPptnR> getList(StPptnR stPptnR);

    BigDecimal calculateDailyRainfall(@Param("stcd") String stcd,
                                      @Param("startTime") LocalDateTime startTime,
                                      @Param("endTime") LocalDateTime endTime);

    void updateDyp(@Param("stcd") String stcd, @Param("tm") Date tm,  @Param("dyp") BigDecimal totalDrp);

    List<StPptnR> getChartData(StPptnR stPptnR);
}